<script type="text/javascript"> 
 
    $(document).ready(function(){ 
		// initialise Superfish 
        $("ul.sf-menu").superfish({ 
            pathClass:  'Configurations' 
        }); 
    }); 
 
</script>

	Configurations &nbsp;&nbsp;<a href="<?=APP_ROOT;?>/configurations/add">Add new</a><br />
	<br />
	<table cellpadding="2" cellspacing="3" class="list">
		<thead>
			<td class = "listID"><a href="<?=APP_ROOT;?>/configurations/index/orderBy:id<?php if(isset($orderBy) && !isset($DESC) && $orderBy == 'id') echo '/DESC:true';?>">ID</a></td>
			<td><a href="<?=APP_ROOT;?>/configurations/index/orderBy:name<?php if(isset($orderBy) && !isset($DESC) && $orderBy == 'name') echo '/DESC:true';?>">Name</a></td>
			<td><a href="<?=APP_ROOT;?>/configurations/index/orderBy:value<?php if(isset($orderBy) && !isset($DESC) && $orderBy == 'value') echo '/DESC:true';?>">Value</a></td>
			<td class = "listAction"><a href="<?=APP_ROOT;?>/configurations/index/orderBy:description<?php if(isset($orderBy) && !isset($DESC) && $orderBy == 'value') echo '/DESC:true';?>">Description</a></td>
			
			<td  align="center">Action</td>
		</thead>
		<? 
			$i = 0;
			foreach ($configurations as $configuration){
				$i++;
				$id = $configuration['Configuration']['id'];
				$name = $configuration['Configuration']['name'];
				$value = $configuration['Configuration']['value'];				
				$description = $configuration['Configuration']['description'];				
		?>
		<tr class="<?php if($i%2) echo 'zuyg'; else echo 'kent';  ?>">
			<td class = "listID">
				<? echo $id; ?>
			</td>
			<td width="20%">
				<? echo $name; ?></td>
			<td width="20%">
				<? echo $value; ?></td>
			<td width="50%">
				<? echo $description; ?></td>
			
			<td class = "listAction">
				<a title="edit" href="<?=APP_ROOT;?>/configurations/edit/<?=$id?>" ><img src="<?=APP_ROOT;?>/img/icons/Colored/GIF/reply.gif" /></a>
				<a title="delete" onclick="javascript:del(<?php echo $id; ?>)" href="#" ><img src="<?=APP_ROOT;?>/img/icons/Colored/GIF/action_delete.gif" /></a>
			</td>
		</tr>
		<?
		}//for main products
		?>
	</table>
<script language="javascript" type="text/javascript">
function del(id){
	if (confirm("Are you sure?")) {
    	window.location.href = "<?=APP_ROOT;?>/configurations/delete/"+id;
	}
}
</script>